#!/bin/sh

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Get application name
application=`getApplication`

runApplication blockMesh


# Creating patches 'out of nothing' so will get undefined value which
# might cause floating point error
unset FOAM_SIGFPE
unset FOAM_SETNAN

# Create faceZones for fan and baffles
runApplication topoSet
# Create fan cyclics
createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite > log.createBaffles 2>&1
# Create wall baffles
createBaffles baffleFaces '(baffles baffles)' -overwrite > log.createBaffles 2>&1

runApplication $application
